class Search
	{
	public static int binarySearch(int[] a,int e)
		{
		int f=0,l=a.length,m,p=-1;
		while(f<=l)
			{
			m=(f+l)/2;
			if(e==a[m])
				{
				p=m;
				break;
				}
			else if(e<a[m])
				l=m-1;
			else
				f=m+1;
			}
		
		return p;
		}
	public static int linearSearch(int[] a,int e)
		{
		int i;
		for(i=0;i<a.length;i++)
			{
			if(e==a[i])
				break;				
			}
		return i;
		}
	}